import request from '@/utils/request'

export function addAdminRole(data) {
  return request({
    url: '/sys-service/inner-api/sys/admin-role',
    data: data,
    method: 'post'
  })
}

export function delAdminRole(id) {
  return request({
    url: '/sys-service/inner-api/sys/admin-role/' + id,
    method: 'delete'
  })
}

export function updateAdminRole(data) {
  return request({
    url: '/sys-service/inner-api/sys/admin-role',
    data: data,
    method: 'put'
  })
}

export function getAdminRole(id) {
  return request({
    url: '/sys-service/inner-api/sys/admin-role/' + id,
    method: 'get'
  })
}

export function pageAdminRole(data) {
  return request({
    url: '/sys-service/inner-api/sys/admin-role/page',
    method: 'post',
    data: data
  })
}

export function getRolePermissionIds(id) {
  return request({
    url: '/sys-service/inner-api/sys/admin-role/' + id + '/permission-ids',
    method: 'get'
  })
}
